package com.dglg.spring.service.impl;

import com.dglg.spring.dao.TrainingClassDao;
import com.dglg.spring.model.*;
import com.dglg.spring.service.TrainingClassService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

@Component
public class TrainingClassServiceImpl implements TrainingClassService {

    @Autowired
    private TrainingClassDao trainingClassDao;

    @Override
    public List<TrainingClass> getTrainingClass(String studentId) {
        return this.trainingClassDao.getTrainingClass(studentId);
    }

    @Override
    public List<Teacher> getTeacherByClass(String className) {
        return this.trainingClassDao.getTeacherByClass(className);
    }

    @Override
    public List<TrainingClass> getProject(String className, String studentId) {
        return this.trainingClassDao.getProject(className, studentId);
    }

    @Override
    public List<String> getTrainClass() {
        return this.trainingClassDao.getTrainClass();
    }

    @Override
    public List<String> getGroupByClass(String className) {
        return this.trainingClassDao.getGroupByClass(className);
    }

    @Override
    public List<String> getStudentIdByCP(String className, String groupName) {
        return this.trainingClassDao.getStudentIdByCP(className, groupName);
    }

    @Override
    public List<StudentLog> getStudentLog(String studentId, String className) {
        return this.trainingClassDao.getStudentLog(studentId, className);
    }

    @Override
    public List<Student> getTrainingStudent(String studentName) {
        return this.trainingClassDao.getTrainingStudent(studentName);
    }

    @Override
    public List<TrainingStudent> getGroupByIdClass(String studentId, String className) {
        return this.trainingClassDao.getGroupByIdClass(studentId, className);
    }

    @Override
    public List<TrainingGroup> getGroupById(String studentId) {
        return this.trainingClassDao.getGroupById(studentId);
    }

    @Override
    public List<Teacher> getTeacherByPhone(String phone) {
        return this.trainingClassDao.getTeacherByPhone(phone);
    }

    @Override
    public List<Teacher> getTeacher() {
        return this.trainingClassDao.getTeacher();
    }

    @Override
    public List<Expert> getExpert() {
        return this.trainingClassDao.getExpert();
    }

    @Override
    public List<String> getGroup() {
        return this.trainingClassDao.getGroup();
    }

    @Override
    public List<TrainingClass> getTrainingClassAll() {
        return this.trainingClassDao.getTrainingClassAll();
    }

    @Override
    public List<StudentLog> getOneByLogDate(String logDate) {
        return this.trainingClassDao.getOneByLogDate(logDate);
    }

    @Override
    public List<TrainingStudent> getStudentByPhone(String phone) {
        return this.trainingClassDao.getStudentByPhone(phone);
    }

    @Override
    public List<String> getScoreMessage() {
        return this.trainingClassDao.getScoreMessage();
    }

    @Override
    public List<TrainingStudent> queryStudentByPhoneAndName(String phone,String name) {
        return this.trainingClassDao.queryStudentByPhoneAndName(phone,name);
    }

    @Override
    public List<TrainingGroup> queryGroupByPhoneAndName(String phone, String name) {
        return this.trainingClassDao.queryGroupByPhoneAndName(phone, name);
    }

    @Override
    public int updateComment(String className, String studentId) {
        return this.trainingClassDao.updateComment(className, studentId);
    }

    @Override
    public int updateDivision(TrainingStudent trainingStudent) {
        return this.trainingClassDao.updateDivision(trainingStudent);
    }

    @Override
    public int updateLog(StudentLog studentLog) {
        return this.trainingClassDao.updateLog(studentLog);
    }

    @Override
    public int updateTeacher(String className, String teacherName) {
        return this.trainingClassDao.updateTeacher(className, teacherName);
    }

    @Override
    public int updateClass(String className, String teacherName) {
        return this.trainingClassDao.updateClass(className, teacherName);
    }

    @Override
    public int insertTeacher(Teacher teacher) {
        return this.trainingClassDao.insertTeacher(teacher);
    }

    @Override
    public int insertUser(User user) {
        return this.trainingClassDao.insertUser(user);
    }

    @Override
    public int insertClass(TrainingClass trainingClass) {
        return this.trainingClassDao.insertClass(trainingClass);
    }

    @Override
    public int insertTrainingStu(String className, String studentId) {
        return this.trainingClassDao.insertTrainingStu(className, studentId);
    }

    @Override
    public int insertExpert(Expert expert) {
        return this.trainingClassDao.insertExpert(expert);
    }

    @Override
    public int insertClassByName(String className, String teacherName) {
        return this.trainingClassDao.insertClassByName(className, teacherName);
    }

    @Override
    public int deleteTrainingStu(String className, String studentId) {
        return this.trainingClassDao.deleteTrainingStu(className, studentId);
    }

    @Override
    public int deleteStudent(String studentId) {
        return this.trainingClassDao.deleteStudent(studentId);
    }

    @Override
    public int deleteClass(String className) {
        return this.trainingClassDao.deleteClass(className);
    }

    @Override
    public int deleteExpert(String phone) {
        return this.trainingClassDao.deleteExpert(phone);
    }

    @Override
    public int deleteTeacher(String className) {
        return this.trainingClassDao.deleteTeacher(className);
    }

    @Override
    public int deleteTeacher2(String className) {
        return this.trainingClassDao.deleteTeacher2(className);
    }

    @Override
    public int deleteTrainStu(String className, String studentId) {
        return this.trainingClassDao.deleteTrainStu(className, studentId);
    }
}
